package com.ydd.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("字典实体类")
public class SysDict implements Serializable {

    @TableId(type = IdType.ASSIGN_ID) // mp自动填充id
    private String id;

    @ApiModelProperty("数据值")
    private String value;

    @ApiModelProperty("标签名")
    private String label;

    @ApiModelProperty("类型")
    private String type;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("排序")
    private Integer sort;

    @TableField(fill = FieldFill.INSERT)  // mp自动填充
    @JsonProperty("create_date")
    private LocalDateTime createDate;

    @TableField(fill = FieldFill.INSERT_UPDATE) // mp自动填充
    @JsonProperty("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty("备注信息")
    private String remarks;

    @TableLogic
    @ApiModelProperty("删除标记 0：正常，1：删除")
    @JsonProperty("del_flag")
    private String delFlag;

}
